package selcoursesys.action;

import com.opensymphony.xwork2.ActionSupport;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.util.ServletContextAware;

import javax.servlet.ServletContext;
import java.io.InputStream;

/**
 * Created by Lpbdz on 2017/4/12.
 */
public class DownloadAction extends ActionSupport {
   public InputStream getDownloadFile() throws Exception{
       return ServletActionContext.getServletContext().getResourceAsStream("/upload/data.csv");
   }

   @Override
    public String execute() throws Exception{
       return super.execute();
   }
}
